package com.lab303.powerproject.service.impl;

import com.lab303.powerproject.entity.AdditionalProperties;
import com.lab303.powerproject.repository.PropertyRepository;
import com.lab303.powerproject.service.PropertyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PropertyServiceImpl implements PropertyService {

    @Autowired
    private PropertyRepository propertyRepository;

    @Override
    public void saveProperties(List<AdditionalProperties> list) {
        propertyRepository.saveAll(list);
    }

    @Override
    public void deletePropertyById(Integer id) {
        propertyRepository.deleteById(id);
    }
}
